import request from '@/utils/request'

export function getRoles(params) {
  return request({
    url: '/sys/role',
    method: 'GET',
    'params': params
  })
}
// 删除数据
export function delRoles(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'delete'
  })
}
// 新增数据
export function addRole(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}
// 编辑数据
export function updateRole(data) {
  return request({
    url: '/sys/role/' + data.id,
    method: 'put',
    data
  })
}

